APPNAME=carpooling

.PHONY: deploy
deploy:
	@echo "\n--- Pulling ---"
	git pull

	@echo "\n--- 开始构建可执行文件 ---"
	GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -v -o $(APPNAME)

	@echo "\n--- 重启服务 ---"
	supervisorctl restart $(APPNAME)

	@echo "\n--- 部署完毕 ---\n"

admin:
	@echo "\n--- build ---"
	npm run build

	@echo "\n--- cp index.html---"
	cp ./dist/index.html ./views/